<div ng-controller="adImgCtrl">
{if $_GPC['iseditor']}
	<!--图片广告-->
	<div class="app-adImg-edit">
		<div class="arrow-left"></div>
		<div class="inner">
			<div class="panel panel-default">
				<div class="panel-body form-horizontal">
					<div class="form-group">
						<label class="control-label col-xs-3">显示方式</label>
						<div class="col-xs-9">
							<label class="radio-inline">
								<input type="radio" class="carousel-style" ng-model="activeItem.params.listStyle" value="1" ng-click="activeItem.params.sizeType=1" name="ad-show-style">折叠轮播
							</label>
							<label class="radio-inline">
								<input type="radio" class="separate-style" ng-model="activeItem.params.listStyle" value="2" name="ad-show-style" />分开显示
							</label>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-xs-3">显示大小</label>
						<div class="col-xs-9">
							<label class="radio-inline">
								<input type="radio" class="size-lg-style" ng-model="activeItem.params.sizeType" value="1"  name="ad-size">大图
							</label>
							<!--分开显示样式才有小图选项-->
							<label class="radio-inline" ng-show="activeItem.params.listStyle == 2">
								<input type="radio" class="size-sm-style" ng-model="activeItem.params.sizeType" value="2"  name="ad-size"/>小图
							</label>
						</div>
					</div>
					<div class="add-adImg-item card clearfix" ng-repeat="item in activeItem.params.items">
						<div class="btns">
							<a href="#" ng-click="addEmpty()"><i class="fa fa-plus"></i></a>
							<a href="#" ng-click="removeItem(item)"><i class="fa fa-times"></i></a>
						</div>
						<div class="col-xs-3 img">
							<h3 ng-click="changeItem(item)">重新上传</h3>
							<img src="" ng-src="{{ item.imgurl }}">
						</div>
						<div class="col-xs-9">
							<div class="form-group">
								<label class="control-label col-xs-3">标题</label>
								<div class="col-xs-9">
									<input class="form-control" name="title" ng-model="item.title" value="" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="control-label col-xs-3">链接</label>
								<div class="col-xs-9 form-control-static ">
									<div ng-my-linker ng-my-url="item.url" ng-my-title="item.title"></div>
								</div>
							</div>
						</div>
					</div>
					<div class="add-adImg card" ng-click="addItem()">
						<a href="#"><i class="fa fa-plus-circle green"></i>添加一个广告</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!--end图片广告-->
{else}
	<link href="../app/resource/components/swiper/swiper.min.css" rel="stylesheet">
	<!--app图片广告-->
	<div class="app-adImg">
		<div class="inner">
			<div class="appstyle js-default-content" ng-if="module.params.items.length == 0">
				<img ng-show="module.params.listStyle == 1" src="./resource/images/app/adImg-lg.jpg"><!--折叠轮播-->
				<img ng-show="module.params.listStyle == 2" src="./resource/images/app/adImg-separate.jpg"><!--分开显示-->
			</div>
			<!--折叠轮播-->
			<div class="swiper-container swiper-container-horizontal" ng-if="module.params.items.length != 0 && module.params.listStyle == 1">
				<div class="swiper-wrapper">
					<div class="swiper-slide" ng-class="{'swiper-slide-active' : $index == 0}" style="width: 100%;" ng-repeat="item in module.params.items">
						<a href="{{item.url}}" style="display:block; width:100%; text-align:center;">
							<img ng-src="{{item.imgurl}}" title="{{item.title}}" style="display:block; height:auto; max-width:100%;  margin:0 auto;">
						</a>
					</div>
				</div>
				<div class="swiper-pagination swiper-pagination-clickable">
					<span class="swiper-pagination-bullet" ng-class="{'swiper-pagination-bullet-active': $index == 0}"  ng-repeat="item in module.params.items"></span>
				</div>
				<div class="swiper-button-next hidden"></div>
				<div class="swiper-button-prev hidden"></div>
			</div>
			<!--分开显示-->
			<div class="show-separate" ng-if="module.params.items.length != 0 && module.params.listStyle == 2">
				<!--大图 lg-->
				<div class="ad-list lg" ng-show="module.params.sizeType == 1">
					<div class="ad-list-item" ng-repeat="item in module.params.items">
						<div>
							<h3 ng-bind="item.title">广告标题</h3>
							<img ng-src="{{item.imgurl}}">
						</div>
					</div>
				</div>
				<!--小图:sm-->
				<div class="ad-list clearfix sm" ng-show="module.params.sizeType == 2" >
					<div class="ad-list-item col-xs-6 col-sm-6" ng-repeat="item in module.params.items">
						<div>
							<h3 ng-bind="item.title">广告标题</h3>
							<img ng-src="{{item.imgurl}}">
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!--end图片广告-->
{/if}
</div>